/**
 */
package gatperdut.chato.model.Chato.Entity.Skill.impl;

import gatperdut.chato.model.Chato.Constant.Skill;

import gatperdut.chato.model.Chato.Entity.Skill.KnownSkill;
import gatperdut.chato.model.Chato.Entity.Skill.SkillPackage;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.internal.cdo.CDOObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Known Skill</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link gatperdut.chato.model.Chato.Entity.Skill.impl.KnownSkillImpl#getSkill <em>Skill</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.Entity.Skill.impl.KnownSkillImpl#getLevel <em>Level</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class KnownSkillImpl extends CDOObjectImpl implements KnownSkill {
    /**
     * The default value of the '{@link #getSkill() <em>Skill</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getSkill()
     * @generated
     * @ordered
     */
    protected static final Skill SKILL_EDEFAULT = Skill.MEDIUM_EDGE;

    /**
     * The default value of the '{@link #getLevel() <em>Level</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getLevel()
     * @generated
     * @ordered
     */
    protected static final int LEVEL_EDEFAULT = 0;

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected KnownSkillImpl() {
        super();
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected EClass eStaticClass() {
        return SkillPackage.Literals.KNOWN_SKILL;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected int eStaticFeatureCount() {
        return 0;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public Skill getSkill() {
        return (Skill)eDynamicGet(SkillPackage.KNOWN_SKILL__SKILL, SkillPackage.Literals.KNOWN_SKILL__SKILL, true, true);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setSkill(Skill newSkill) {
        eDynamicSet(SkillPackage.KNOWN_SKILL__SKILL, SkillPackage.Literals.KNOWN_SKILL__SKILL, newSkill);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public int getLevel() {
        return (Integer)eDynamicGet(SkillPackage.KNOWN_SKILL__LEVEL, SkillPackage.Literals.KNOWN_SKILL__LEVEL, true, true);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setLevel(int newLevel) {
        eDynamicSet(SkillPackage.KNOWN_SKILL__LEVEL, SkillPackage.Literals.KNOWN_SKILL__LEVEL, newLevel);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public Object eGet(int featureID, boolean resolve, boolean coreType) {
        switch (featureID) {
            case SkillPackage.KNOWN_SKILL__SKILL:
                return getSkill();
            case SkillPackage.KNOWN_SKILL__LEVEL:
                return getLevel();
        }
        return super.eGet(featureID, resolve, coreType);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eSet(int featureID, Object newValue) {
        switch (featureID) {
            case SkillPackage.KNOWN_SKILL__SKILL:
                setSkill((Skill)newValue);
                return;
            case SkillPackage.KNOWN_SKILL__LEVEL:
                setLevel((Integer)newValue);
                return;
        }
        super.eSet(featureID, newValue);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eUnset(int featureID) {
        switch (featureID) {
            case SkillPackage.KNOWN_SKILL__SKILL:
                setSkill(SKILL_EDEFAULT);
                return;
            case SkillPackage.KNOWN_SKILL__LEVEL:
                setLevel(LEVEL_EDEFAULT);
                return;
        }
        super.eUnset(featureID);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public boolean eIsSet(int featureID) {
        switch (featureID) {
            case SkillPackage.KNOWN_SKILL__SKILL:
                return getSkill() != SKILL_EDEFAULT;
            case SkillPackage.KNOWN_SKILL__LEVEL:
                return getLevel() != LEVEL_EDEFAULT;
        }
        return super.eIsSet(featureID);
    }

} //KnownSkillImpl
